<div class="container">
    <div class="row">
        <div class="span12">
            <div class="widget">
            	<form id="myForm" action="${base}/show_resource/show_resource_ip" method="post">
            	集群名称：<input type="text" id="cluster" name="cluster" value="${cluster!}" />&nbsp;&nbsp;
            	ip+端口号：<input type="text" id="ip" name="ip" value="${ip!}" />&nbsp;&nbsp;<a href="javascript:void(0)" onclick="invoke()">移除服务</a>
            	</form>
            </div>
        </div>
    </div>
</div>
<script src="${base}/resources/javascripts/jquery.min.js"></script>
<script type="text/javascript">
	<!--
	function invoke() {
		var cluster = $("#cluster").val();
		var ip = $("#ip").val();

		if(confirm("确定要移除此ip的push服务么?")){
			$.ajax({
	            type: "POST",
	            url: "${base}/resource_manage/remove_ip_service",
	            data: {"clusterValue":cluster,"ipValue":ip},
	            dataType: "json", 
	            success: function (result) {
	            	if(result.code == 0) {
	            		alert("移除成功");
	            	} else {
	            		alert("移除失败");
	            	}
	            },

	            error: function (result) { 
	               alert("错误");
	            } 
    		});
		}
	}
	//-->
</script>
